<?php

/**
 * Eloquent
 */

$database = [
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'pear-admin',
    'username' => 'root',
    'password' => 'root',
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
];

use Illuminate\Database\Capsule\Manager as DB;

$capsule = new DB;
// 创建链接
$capsule->addConnection($database);
// 设置全局静态可访问
$capsule->setAsGlobal();
// 启动Eloquent
$capsule->bootEloquent();
